package com.sefer.dragonfly.client.core.domain.lifecycle;

import com.sefer.dragonfly.client.constants.State;

/**
 * <pre>
 * 生命期接口，状态流转图如下：
 * 
 * init -----> running<------>stop
 *  ^                           |
 *  |                           | 
 *  |                           |
 *  |                           |
 *  |                           v
 * --------------------------destory
 * 
 * </pre>
 * 
 * @author xiaofeng 2011-9-9 上午09:20:17
 */
public interface Lifecycle {

    void init();

    void start();

    void stop();

    void destory();

    State getState();

    void setState(State state);
}
